﻿using System;
using System.IO;

namespace Magellan.ProjectWizards.Framework
{
    public static class PathHelper
    {
        public static string GetRelativePath(string basePath, string absoluteFilePath)
        {
            var uri1 = new Uri(Path.GetFullPath(absoluteFilePath));
            var uri2 = new Uri(Path.GetFullPath(basePath));
            var relativePath = uri2.MakeRelativeUri(uri1).ToString().Replace("/", "\\");
            return relativePath;
        }
    }
}
